<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Jekyll v4.1.1">
    <title>华萃轩个人信息表</title>

    <link rel="canonical" href="https://getbootstrap.com/docs/4.5/examples/checkout/">

    <!-- Bootstrap core CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <style>
      .bd-placeholder-img {
        font-size: 1.125rem;
        text-anchor: middle;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }

      @media (min-width: 768px) {
        .bd-placeholder-img-lg {
          font-size: 3.5rem;
        }
      }
    </style>
    <!-- Custom styles for this template -->
    <link th:href="@{/css/form-validation.css}" rel="stylesheet">
  </head>
  <body class="bg-light">
    <div class="container">
  <div class="py-5 text-center">
    <img class="d-block mx-auto mb-4" th:src="@{/img/building.png}" alt="" width="72" height="72">
    <h2>个人信息表</h2>
    <p class="lead">填写下列表格后，我们将为您提供更优质的服务！</p>
  </div>

  <div class="row">
      <form th:action="@{/user/to_register2}" class="needs-validation" novalidate>
       

        <div class="mb-3">
          <label for="username">用户名 <span class="text-muted">(请输入3~5个字符)</span></label>
         <input type="text" class="form-control" name="username" id="username"  placeholder="请输用户名" th:value="${user.getUsername()}" required>
        </div>
<br />
 <div class="mb-3">
          <label for="userphone">电话号码 <span class="text-muted">(必填)</span></label>
         <input type="text" class="form-control" name="tel" id="userphone" placeholder="请输电话号码" th:value="${user.getTel()}" required>
        </div>
<br />
       
        <div class="mb-3">
          <label for="address">地址 <span class="text-muted">(必填)</span></label>
          <input type="text" name="address" class="form-control" id="address" placeholder="1234 Main St" th:value="${user.getAddress()}"  required>
         
        </div>
<br />

 
      

       
       <!--  
        <hr class="mb-4">
        <div class="custom-control custom-checkbox">
          <input type="checkbox" class="custom-control-input" id="same-address">
          <label class="custom-control-label" for="same-address">Shipping address is the same as my billing address</label>
        </div>
        <div class="custom-control custom-checkbox">
          <input type="checkbox" class="custom-control-input" id="save-info">
          <label class="custom-control-label" for="save-info">Save this information for next time</label>
        </div>
        <hr class="mb-4"> -->
<div style="display: flex;flex-direction: row;">
	<label style="font-size: 15px;">性别</label>
	
	
	  <div class="custom-control custom-radio"style="margin-left: 20px;">
	    <input id="credit" name="sex" type="radio" class="custom-control-input" value="男" checked required>
	    <label class="custom-control-label" for="credit">男</label>
	  </div>
	  <div class="custom-control custom-radio" style="margin-left: 20px;">
	    <input id="debit" name="sex" type="radio" class="custom-control-input" value="女" th:checked="${user.getSex() eq '女'}" required>
	    <label class="custom-control-label" for="debit">女</label>
	  </div>

</div>
<br />
        
       <div class="mb-3">
                 <label for="password">修改密码</label>
                 <input type="password" class="form-control" th:value="${user.getPassword()}" name="password" id="password" placeholder="请输入5~8个字符" required>
                
               </div>
       <br />
		  <div class="mb-3">
		            <label for="password">确定密码</label>
		            <input type="password" class="form-control" id="passwordAgain" onblur="fun()" placeholder="请再次输入密码" required>
		           <span id="tip"></span>
		          </div>
		  <br />
        
       
		<br />
		<br />
        <input class="btn btn-primary btn-lg btn-block" type="submit" value="提 交"/>
      </form>
    </div>
  </div>
<br />
  <footer class="my-5 pt-5 text-muted text-center text-small">
    <p class="mb-1">&copy; 2020-2030 华萃轩云平台</p>
   
  </footer>
</div>
    <script type="text/javascript">
        function fun() {
            if ($("#password").val()!=$("#passwordAgain").val()){
                $("#tip").css("color","red");
                $("#tip").html("两次密码不一致");
            }else {
                $("#tip").html("");
            }
        }
    </script>
</body>
</html>
